class Queue4():
    def __init__(self):
        self.maxsize = 4
        self.__list = list()

    def qsize(self):
        return len(self.__list)

    def put(self, d):
        while self.qsize()>=self.maxsize:
            del self.__list[0]
        self.__list.append(d)

    def clear(self):
        self.__list = list()

    def get(self):
        if self.qsize()>0:
            return self.__list[0]
        else:
            return None

    def average(self):
        if self.qsize()>0:
            return sum(self.__list)/len(self.__list)
        else:
            return None

q = Queue4()

web_move_to_wheel = {
        "clientId": "master",
        "wsMsgType": "NOTIFICATION",
        "modules": "adminControl",
        "data": {
            "msgId": 200,
            "moveInWheel": {
                "msg": 1
            }
        }
    }

import json
print(json.dumps(web_move_to_wheel))
